package com.atguigu.upp.mapper;

import com.atguigu.upp.beans.TaskTagRule;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2023/3/24
 */
public interface TaskTagRuleMapper
{
    @Select("SELECT" +
        "   t2.*, tag_name subTagValue" +
        " FROM" +
        " (SELECT id,tag_name FROM `tag_info` ) t1" +
        " JOIN" +
        " (SELECT * FROM `task_tag_rule`  WHERE task_id = #{id}  ) t2" +
        " ON t1.id = t2.sub_tag_id")
    List<TaskTagRule> queryRulesByTaskId(String id);
}
